package ar.org.cfired.creditos.sbsa;

import org.hibernate.Query;
import org.hibernate.Session;
import java.util.List;
import org.jbpm.api.Configuration;
import ar.org.cfired.hibernate.utils.HibernateUtil;

public class LeerExpedientes {

	public static void main (String args[]) {
		Session session = null;
		session = HibernateUtil.getSessionFactory().getCurrentSession();
		session.beginTransaction(); 
		Expediente exp;
		Query q = session.createQuery("from ar.org.cfired.creditos.sbsa.Expediente where estadomante='V'");
		
		List<Expediente> rta = q.list();
		System.out.println(rta.size());
		for (int i = 0; i<rta.size(); i++) {
			exp = rta.get(i);
			if (exp != null)
				System.out.println(exp.getFechaMante() + " -- "  + exp.getHoraMante() );
		}
		
		exp = new Expediente();
		
		
	}
}
